﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="new.aspx.cs" Inherits="www.pages.project._new" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../../css/lanai-ui.min.css" rel="stylesheet" />
</head>
<body>
    <section class="content no-pad-top">
        <form id="form1" runat="server">
            <div class="box box-widget no-shadow no-radius-childs">
                <div class="box-body">
                    <div class="form-group">
                        <label>项目名称(<span class="text-red">*</span>)</label>
                        <input id="txt_name" type="text" class="form-control" placeholder="请输入项目名称" runat="server" />
                    </div>
                    <div class="form-group">
                        <label>描述</label>
                        <textarea id="txt_comment" rows="5" class="form-control" style="resize: none;" runat="server"></textarea>
                    </div>
                </div>
                <div class="box-footer navbar-fixed-bottom">
                    <a href="#" id="btnSave" class="pull-right btn btn-default btn-flat">保存项目</a>
                </div>
            </div>
            <input type="hidden" id="hid_project" runat="server" value="0" />
        </form>
    </section>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/lanai-ui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#btnSave").click(function () {
                var id = $("#hid_project").val();
                var name = $("#txt_name").val();
                var comment = $("#txt_comment").val();
                if (name == "") {
                    parent.layer.alert("请输入项目名称", { title: '系统提示', icon: 2 });
                    return;
                }
                parent.doSaveProject(id, name, comment);               
            })
        })
    </script>
</body>
</html>
